package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.SystemMessage;
import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.mapper.SystemMessageMapper;
import cn.wolfcode.trip.base.mapper.UserMapper;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.service.ISystemMessageService;
import cn.wolfcode.trip.base.service.IUserService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SystemMessageServiceImpl implements ISystemMessageService {

    @Autowired
    private SystemMessageMapper systemMessageMapper;

    @Override
    public void insert(SystemMessage systemMessage) {
        systemMessageMapper.insert(systemMessage);
    }

    @Override
    public List<SystemMessage> selectAll(int state) {
        return systemMessageMapper.selectAll(state);
    }

    @Override
    public void delete(Long systemMessageId) {
        systemMessageMapper.deleteByPrimaryKey(systemMessageId);
    }

    @Override
    public void changeState(int state, Long systemMessageId) {
        systemMessageMapper.changeState(state, systemMessageId);
    }
}
